import request from "./index";

/**
 * 获取所有 note 信息
 */
export const getAllNotes = async () => {
  return request.get("/");
};

/**
 * 更新 note
 */
export const updateNote = async (id, data) => {
  return request.put(`/${id}`, data);
};

/**
 * 删除 note
 */
export const deleteNote = async (id) => {
  return request.delete(`/${id}`);
};

/**
 * 添加note
 */
export const addNote = async (note) => {
  return request.post("/", note);
};
